<?php

/**
 * Teaching form.
 *
 * @package    elearning
 * @subpackage form
 * @author     Your name here
 */
class TeachingForm extends BaseTeachingForm
{
  public function configure()
  {
	//$this->widgetSchema['teacher_id'] = new sfWidgetFormPropelChoice(array('model' => 'Teacher', 'add_empty' => false));
	//$this->widgetSchema['classes_id'] = new sfWidgetFormPropelChoice(array('model' => 'Classes', 'add_empty' => false));
	unset( $this['created_at'], $this['updated_at'] );
	$teaching = $this->getObject();
		if( $teaching->getTeachingStatus() == 0 )
			$teaching->setTeachingStatus(NULL);
	$this->widgetSchema['teaching_status'] = new sfWidgetFormInputCheckbox(array("value_attribute_value" => 1),array('value' => 1));
	$this->validatorSchema['teaching_status'] =  new sfValidatorInteger( array('required' => false ));
	$this->widgetSchema->setNameFormat('teaching[%s]');
  }
}
